package com.mp.approvalreq.dao;

import com.mp.approvalreq.entity.dto.*;
import com.mp.approvalreq.entity.message.RequestTimeMsg;

import java.sql.SQLException;
import java.util.List;

public interface OperateTemplateDao {

	/**
	 * 新增组件集
	 *
	 * @param componentGroupDTO
	 * @param companyId
	 * @return
	 * @throws SQLException
	 */
	int insertComponentGroup(ComponentGroupDTO componentGroupDTO, Integer companyId) throws SQLException;

	/**
	 * 删除组件集
	 *
	 * @param companyId
	 * @param componentGroupId
	 * @throws SQLException
	 */
	void deleteComponentGroup(Integer companyId, Integer componentGroupId) throws SQLException;


	/**
	 * 更换通用审批流
	 *
	 * @param generalRequestDTO
	 * @param companyId
	 * @param newFlows
	 * @throws SQLException
	 */
	void changeGeneralRequestFlow(GeneralRequestDTO generalRequestDTO, Integer companyId, String newFlows) throws SQLException;


	/**
	 * 更换通用条件审批流
	 *
	 * @param newFlows
	 * @param companyId
	 * @throws SQLException
	 */
	void changeGeneralConditionRequestFlow(List<GeneralConditionFlowDTO> newFlows, Integer companyId) throws SQLException;

	/**
	 * 记录审批的调休时长
	 *
	 * @param requestTimeMsg
	 * @throws SQLException
	 */
	void insertDaysOffTimes(RequestTimeMsg requestTimeMsg) throws SQLException;


	/**
	 * 更新加班转化的调休时长
	 *
	 * @param requestTimeMsg
	 * @throws SQLException
	 */
	void updateDaysOffTimes(RequestTimeMsg requestTimeMsg) throws SQLException;
}
